import request from '@/utils/request';
/**
 * 评价-信批合规-信批评级
 */
export async function getComplianceRank(payload) {
  const { stock_code } = payload;
  return request(`/api/gold/compliance_option`, {
    method: 'GET',
  });
}

/**
 * 评价-信批合规-本年度信披违规统计
 */
export async function getComplianceStat(payload) {
  const { stock_code } = payload;
  return request(`/api/gold/compliance_statistics`, {
    method: 'GET',
  });
}

/**
 * 评价-信批合规-函件(特殊逻辑的监管函件)
 */
export async function getSpecialLetter(payload) {
  return request(`/api/gold/special_regulatory_letter`, {
    method: 'GET',
  });
}

/**
 * 评价-信批合规-扣分细则
 */
export async function getViolation(payload) {
  return request(`/api/gold/regulatory_violation`, {
    method: 'GET',
  });
}

/**
 * 评价-信批合规-监管反馈
 */
export async function getFeedback(payload) {
  return request(`/api/gold/regulatory_feedback`, {
    method: 'GET',
  });
}

/**
 * 评价-获取作图工具数据
 * @param {*} payload
 */
export async function getDrawData(payload) {
  let url = `/api/gold/drawing_tools?company_code=${payload.compareCmp}`;

  return request(url, {
    method: 'GET',
    company_code: payload.compareCmp,
  });
}

/**
 * 评价-获取综合评价数据
 * @param {*} payload
 */
export async function getCPData(payload) {
  return request(`/api/gold/comprehensive_evaluation`, {
    method: 'GET',
  });
}

/**
 * 评价-财务分析-获取债尝数据
 * @param {*} payload
 */
export async function getPayDebtData(payload) {
  return request(`/api/gold/solvency_analysis`, {
    method: 'GET',
  });
}

/**
 * 评价-财务分析-盈利分析
 * @param {*} payload
 */
export async function getProfitData(payload) {
  return request(`/api/gold/profitability_analysis`, {
    method: 'GET',
  });
}

/**
 * 评价-财务分析-现金流分析
 * @param {*} payload
 */
export async function getCashFlowData(payload) {
  return request(`/api/gold/cash_flow_analysis`, {
    method: 'GET',
  });
}

/**
 * 评价-财务分析-成长分析
 * @param {*} payload
 */
export async function getGrowAbilitiesData(payload) {
  return request(`/api/gold/growth_analysis`, {
    method: 'GET',
  });
}

/**
 * 评价-财务分析-营运分析
 * @param {*} payload
 */
export async function getOperationCapacityData(payload) {
  return request(`/api/gold/operation_analysis`, {
    method: 'GET',
  });
}

/**
 * 评价-竞品对比-获取本公司数据
 */
export async function getCompanyInfo(payload) {
  // return request(`/api/cattle/get_company_info`, {
  return request(`/api/gold/company_info`, {
    method: 'GET',
  });
}
/**
 * 评价-竞品对比-获取所有公司数据
 */
export async function getAllCompanyInfo(payload) {
  return request(`/api/gold/all_company_info`, {
    method: 'GET',
  });
}
/**
 * 评价-竞品对比-获取公司对比数据
 */
export async function getCompareData(payload) {
  // type=profit&company=600000 cattle/compare_data
  // /cattle/comparison_data
  return request(`/api/gold/comparison_data?company_code=${payload.company_code}`, {
    method: 'GET',
    ...payload,
  });
}

/**
 * 评价-获取相似聚类数据
 * @param {*} payload
 */
export async function getSimilarData(payload) {
  return request(`/api/gold/character_similar`, {
    method: 'GET',
  });
}
